testsuite/gtk/slicelistmodel.c: Avoid VLAs
authorChun-wei Fan <fanchunwei@src.gnome.org>
Mon, 21 Jan 2019 05:49:20 +0000 (13:49 +0800)
committerChun-wei Fan <fanchunwei@src.gnome.org>
Mon, 21 Jan 2019 05:49:20 +0000 (13:49 +0800)
Unfortunately VLA's are unlikely to be supported on any Visual Studio
versions, although it is C99, so replace it with g_newa() calls.

testsuite/gtk/slicelistmodel.c

index 960133c8058c61c1c554e4685c67a1240ffd1a25..01717c8f51ac565221014e5ee9c115f049cbf972 100644 (file)
@@ -74,7 +74,7 @@ splice (GListStore *store,
         guint      *numbers,
         guint       added)
 {
-  GObject *objects[added];
+  GObject **objects = g_newa (GObject *, added);
   guint i;
 
   for (i = 0; i < added; i++)